﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace FichoWeb.Models
{
    public class Album
    {
        public Album()
        {
            this.Images = new HashSet<Image>();
        }

        [ScaffoldColumn(false)]
        public int Id { get; set; }
        [Required]
        public string Name { get; set; }
        public string Description { get; set; }

        private DateTime? _Date = null;
        public DateTime Date 
        { 
            get { 
                return this._Date.HasValue ? this._Date.Value: DateTime.Now; 
            } 
            set {
                this._Date = value;
            } 
        }

        public virtual ICollection<Image> Images { get; set; }
    }
}